package com.sj.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.sj.entity.Comment;
import com.sj.mapper.CommentMapper;
import com.sj.service.CommentService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 服务实现类
 * </p>
 *
 * @author 小七
 * @since 2021-07-30
 */
@Service
public class CommentServiceImpl extends ServiceImpl<CommentMapper, Comment> implements CommentService {

    @Autowired
    private CommentMapper commentMapper;

    @Override
    public List<Comment> listCommentWhereParentIdIsNull(Integer blogId) {
        return commentMapper.listCommentWhereParentIdIsNull(blogId);
    }

    @Override
    public List<Comment> getCommentByParentId(Integer id) {
        return commentMapper.getCommentByParentId(id);
    }
}
